package com.hivekion.common.Date;

import java.text.SimpleDateFormat;
import java.util.Date;

public class DateUtils {

      public static int getNowYear() {
	    SimpleDateFormat yearFormat = new SimpleDateFormat("yyyy");
	    Date date = new Date();
	    String year = yearFormat.format(date);
	    return Integer.valueOf(year);
      }

      public static String getNowDay() {
	    SimpleDateFormat dayFormat = new SimpleDateFormat("yyyy-MM-dd");
	    Date date = new Date();
	    return dayFormat.format(date);
      }

      public static String getRandomFileName() {
	    Date date = new Date(System.currentTimeMillis());
	    SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
	    return simpleDateFormat.format(date);
      }
}
